#include "PAP_defs.h"

#define TPM_PRESCALER_1 0
#define TPM_PRESCALER_2 1
#define TPM_PRESCALER_4 2
#define TPM_PRESCALER_8 3
#define TPM_PRESCALER_16 4
#define TPM_PRESCALER_32 5
#define TPM_PRESCALER_64 6
#define TPM_PRESCALER_128 7

#define TPM_HIGH_TRUE 2
#define TPM_LOW_TRUE 1

#define TPM_DISABLED    0
#define TPM_BUS_CLOCK   1
#define TPM_XCLK        2
#define TPM_EXT_CLOCK   3
                                                       
void vfnTPM_SetModulo (uint8 u8timer, uint16 u16modulo);

void vfnTPM_OverflowInterrupts (uint8 u8timer, uint8 u8config);

void vfnTPM_PrescalerSelect (uint8 u8timer, uint8 u8prescaler);

void vfnTPM_ClockSelect (uint8 u8timer, uint8 u8source);

void vfnTPM_SetChannelValue (uint8 u8timer, uint8 u8channel, uint16 u16value);

void vfnTPM_ConfigureCAPWM (uint8 u8timer, uint8 u8channel, uint8 u8config);

void vfnTPM_ConfigureEAPWM (uint8 u8timer, uint8 u8channel, uint8 u8config);

uint16 u16TPM3_GetChannelValue (uint8 u8channel);

void vfnTPM2_SoftwareOutputCompare (uint8 u8channel);
